﻿<UserControl
    x:Class="VisibilityDemoApp.NewWay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vcl="using:VisibilityControlLibrary">
    <StackPanel>
        <CheckBox
            x:Name="MyCheckBox"
            Content="MyCheckBox" />
        <vcl:VisibilityControl
            IsTrue="{Binding ElementName=MyCheckBox, Path=IsChecked}">
            <StackPanel
                Orientation="Vertical">
                <TextBlock
                    Text="This is the false content" />
                <TextBox
                    Text="FALSE" />
            </StackPanel>
            <StackPanel
                Orientation="Vertical">
                <TextBlock
                    Text="This is the true content" />
                <TextBox
                    Text="TRUE" />
            </StackPanel>
        </vcl:VisibilityControl>
    </StackPanel>
</UserControl>
